package sinan;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.IPlaceholderFolderLayout;

import sinan.view.AppView;
import sinan.view.ResultView;
import sinan.view.SqlInputView;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		
		layout.addStandaloneView(AppView.ID, true, IPageLayout.LEFT, .20f, IPageLayout.ID_EDITOR_AREA);
		layout.addStandaloneView(SqlInputView.ID, true, IPageLayout.TOP, .40f, IPageLayout.ID_EDITOR_AREA);

		layout.getViewLayout(AppView.ID).setCloseable(false);
		layout.getViewLayout(SqlInputView.ID).setCloseable(false);

		IPlaceholderFolderLayout fl = layout.createPlaceholderFolder(ResultView.ID, IPageLayout.BOTTOM, 0.6f, IPageLayout.ID_EDITOR_AREA);
		fl.addPlaceholder(ResultView.ID + ":*");

		layout.setEditorAreaVisible(false);
		layout.setFixed(true);
	}
}
